﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFDemo.Model
{
    [Table("Person")]
    public class Person : BaseDomain
    {

    }

    public class PersonMapping : EntityTypeConfiguration<Person>
    {
        public PersonMapping()
        {
            ToTable(nameof(Person));
            HasKey(s => s.ID);

            Property(s => s.Name).HasMaxLength(200).IsRequired();

        }
    }
}
